import java.util.Arrays;

public class Work81605 {
    public static void main(String[] args) {
        String[] a = {"王一", "王二", "王三", "王四", "王老五", "王老六"};
        int[] b = {59, 80, 60, 90, 85, 95};
        for (int i = 0; i < a.length - 1; i++) {
            for (int j = 0; j < a.length - 1 - i; j++) {
                if (b[j] < b[j + 1]) {
                    int d = b[j];
                    b[j] = b[j + 1];
                    b[j + 1] = d;
                    String e = a[j];
                    a[j] = a[j + 1];
                    a[j + 1] = e;
                }
            }
        }
        System.out.println(Arrays.toString(a));
        System.out.println(Arrays.toString(b));
    }
}
